package com.systop.service.UserServiceImpl;

import com.systop.mapper.GoodsMapper;
import com.systop.pojo.Goods;
import com.systop.pojo.Goods_type;
import com.systop.service.GoodsService;
import com.systop.unti.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class GoodsServiceImpl implements GoodsService {

    @Autowired
    private GoodsMapper goodsMapper;

    @Override
    public ResponseResult addGoods(Goods goods) {
        Integer i = goodsMapper.addGoods(goods);
        return ResponseResult.ok(i);
    }

    @Override
    public List<Goods> findall() {
        System.out.println("这是从数据库查的");
        return goodsMapper.findall();
    }

//    @Override
//    public List<Goods_type> findallGoodsType() {
//        return goodsMapper.findallGoodsType();
//    }
}
